const baseURL = 'https://api-hmugo-web.itheima.net/api/public/v1/'
const request =({
	url,method='get',data={}
})=>{
	return new Promise((resolve,reject)=>{
		uni.request({
			url:baseURL + url,
			method:method,
			data:data,
			success(res) {
				resolve(res.data)
			},
			fail(error) {
				reject(error)
			}
		})
	})
}
export default request